package com.zlkj.pro.modular.app.controller;

import cn.stylefeng.roses.kernel.rule.pojo.response.ResponseData;
import cn.stylefeng.roses.kernel.rule.pojo.response.SuccessResponseData;
import cn.stylefeng.roses.kernel.scanner.api.annotation.ApiResource;
import cn.stylefeng.roses.kernel.scanner.api.annotation.GetResource;
import com.zlkj.pro.modular.app.service.AppBannerService;
import com.zlkj.pro.modular.business.model.vo.BannerVO;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

import static com.zlkj.pro.core.consts.ProjectConstants.SERVICE_APP_PREFIX;

/**
 * @author liyang
 * @date 2024/4/6
 * @time 14:34
 */
@Slf4j
@RestController
@RequiredArgsConstructor
@ApiResource(name = "轮播图哦", path = SERVICE_APP_PREFIX + "/banner")
public class AppBannerController {

    private final AppBannerService appBannerService;

    @GetResource(name = "轮播图", path = "/list")
    public ResponseData list() {
        List<BannerVO> list = appBannerService.findList();
        return new SuccessResponseData(list);
    }

}
